title: Beyond simple maps - Integrating space and time with Bayesian models author: - “Corey S. Sparks, Ph.D.” institute: - “Univerity of Texas at San Antonio - Department of Demography” - https://hcap.utsa.edu/demography date: “July 11, 2022” subtitle: Summer at Census Research Seminar output: beamer_presentation

Presentation Structure

Beyond maps…

.center[John Snow’s Cholera Map]

class: center, inverse

.center[Rural - Urban Continuum]

class: center, inverse

.center[IMR - Relative Risk, 2000]

Spatial Demography

- Macro - demography (Voss, 2007) + Places as observations + Pre - 1960’s + Ecological inference
- Micro - demography + People as observations + Social theory + Individual choices

Space & Time

- Time allows for dynamics of humans and environment + Snap shots/cross sections tell us nothing of this
- Data management + Combining and merging data
- Advantages + Rich, dynamic contexts + Policy relevance of timely, prospective analysis
- Census/ACS
- IPUMS
- International agencies

How to combine these things?

- Caveats - Levels of geography + The evil tracts - MAUP - Changing boundaries
- You can basically get these data from the CDC Wonder website - Suppresses counts where the number of deaths is less than 10 - Rates are labeled as “unreliable” when the rate is calculated with a numerator of 20 or less + Big problem for small population counties + Still a problem for large population counties!

Data example

County Year Race-Sex Rate
12073 1980 White Female 7.238632
12073 1980 Black Female 8.958174
12073 1980 White Male 11.840842
12073 1980 Black Male 15.907688
12073 1981 White Female 7.383039
12073 1981 Black Female 9.379846
12073 1981 White Male 10.518428
12073 1981 Black Male 16.626825
12073 1982 White Female 7.370335
12073 1982 Black Female 8.695655
12073 1982 White Male 11.902308
12073 1982 Black Male 12.149819

County specific temporal trends 1980 - 2010

Florida Example

Methods - Bayesian Hierarchical models

\[ \begin{aligned} \operatorname{y}_{ij} &\sim N\left( \mu, \tau_y \right) \\ & \mu_{ij} = \beta_{0} + x'\beta +\gamma_j*Black + u_j +\nu_{t1} + \nu_{t2}* Black \\ & \gamma_j \sim \text{CAR}(\bar \gamma_j, \tau_{\gamma}/n_j) \\ & u_j \sim \text{CAR}(\bar u_j, \tau_u /n_j)\\ & \nu_{t2} \sim RW1(time)\\ & \nu_{t1} \sim N(0, \tau_t) \\ \end{aligned} \]

Methods - Bayesian Hierearchical models

*\[p(\theta|y) \propto p(y|\theta)p(\theta)\]

Methods - INLA approach

Methods - INLA approach

INLA in R

library(INLA)

std_rate~male+black+scale(lths)+

f(year2, model = "rw1",constr = T, scale.model = T)+ nonparametric time trend

f(struct, model="besag", graph="cl_graph", constr = T, scale.model = T)+ spatial correlation

f(year3, bl2, model="iid")+ time - disparity

f(struct2, bl2, model="besag", graph="cl_graph", constr = T, scale.model = T) spatial disparity

Results

Spatial trend

Spatial disparity

Discussion

Low Response Score Outcome

\[ \begin{aligned} \operatorname{y}_{i} &\sim \text{Normal}\left( \mu_i, \tau_y \right) \\ & \mu_{i} = \beta_{0} + u_i + v_i \\ & u_i \sim \text{CAR}(\bar u_i, \tau_{u}/n_j) \\ & u_i \sim \text{Normal}(\bar 0, \tau_{v}/n_j) \\ \end{aligned} \]

Low Response Score in Texas

Spatial correlation random effect

IID random effect

  • Spatial model fits much better than non-spatial model using WAIC
  • Suggests model should take into account spatial structure in LRS underlying data
  • Larger suggestion is that spatial correlation needs to be included in the underlying construction of the LRS

More discussion

Thank you!

corey.sparks@utsa.edu

@Coreysparks1

UTSA Demography

Slides created via the R package xaringan

All talk materials available at my Github page

R-INLA examples available at my Rpubs page